﻿<Window x:Class="Mskold.IterationManager.SettingsDlg"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:Mskold.IterationManager"
        Title="Configure Iteration Manager" Height="464" Width="540"  Name="frmSettingsDlg" WindowStartupLocation="CenterOwner">
    <Window.DataContext >
        <vm:SettingsViewModel />
    </Window.DataContext>
    <Window.Resources>
        
        <Style TargetType="{x:Type Image}" x:Key="toolbarImageStyle">
            <Style.Triggers>
                <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Button}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
                    <Setter Property="Opacity" Value="0.50"></Setter>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <Grid Width="526">
        <RadioButton Content="Auto configured" GroupName="rdgrpConfigureNewIteration" Height="16" HorizontalAlignment="Left" IsChecked="True" Margin="26,12,0,0" Name="radioButton1" VerticalAlignment="Top" />
        <RadioButton Content="Manuall configured" GroupName="rdgrpConfigureNewIteration" Height="16" HorizontalAlignment="Right" IsChecked="{Binding Path=Config.ConfigStore.NewIterationManualConfig, Mode=TwoWay}" Margin="0,12,240,0" Name="radioButton2" VerticalAlignment="Top" Width="137" />
        <GroupBox Header="On new iteration" Height="225" HorizontalAlignment="Left" Margin="20,34,0,0" Name="groupBox1" VerticalAlignment="Top" Width="499" IsEnabled="{Binding Path=Config.ConfigStore.NewIterationManualConfig}">
            <Grid Width="487">
                <CheckBox Content="Create a new Iteration folder" Height="16" HorizontalAlignment="Left" Margin="30,140,0,0" Name="checkBox1" VerticalAlignment="Top" Width="220" IsChecked="{Binding Path=Config.ConfigStore.CreateSprintFolder, Mode=TwoWay}" IsEnabled="{Binding Path=Config.ConfigStore.NewIterationManualConfig}" />
                <Label Content="Based on TeamQuery folder " Height="35" HorizontalAlignment="Left" Margin="58,162,0,0" Name="label2" VerticalAlignment="Top" />
                <ComboBox Height="23" HorizontalAlignment="Left" Margin="225,162,0,0" Name="cboTemplateQueryFolder" VerticalAlignment="Top" Width="246" SelectedValuePath="Key" DisplayMemberPath="Value" SelectedValue="{Binding Path=Config.ConfigStore.TempalteWIQLFolder, Mode=TwoWay}" ItemsSource="{Binding Path=TeamQueryFolders}" IsEnabled="{Binding Path=Config.ConfigStore.CreateSprintFolder}" />
                <CheckBox Content="Create a new Sprint workitem" Height="16" HorizontalAlignment="Left" Margin="30,17,0,0" Name="chkCreateNewSprintWI" VerticalAlignment="Top" Width="220" IsChecked="{Binding Mode=TwoWay, Path=Config.ConfigStore.CreateSprintWorkItem}" IsEnabled="{Binding Path=Config.ConfigStore.NewIterationManualConfig}" />
                <Label Content="Create a " Height="23" HorizontalAlignment="Left" Margin="58,39,0,0" Name="label1" VerticalAlignment="Top" IsEnabled="False" />
                <ComboBox Height="23" Margin="112,39,299,0" Name="cboSpintWI" VerticalAlignment="Top" ItemsSource="{Binding Path=WorkItemTypes}" SelectedItem="{Binding Path=Config.ConfigStore.SprintWorkItemType}" IsEnabled="{Binding Path=Config.ConfigStore.CreateSprintWorkItem}" SelectionChanged="cbo_SprintWI_Changed" />
                <Label Content="workitem and " Height="23" HorizontalAlignment="Right" Margin="0,39,207,0" Name="label3" VerticalAlignment="Top" IsEnabled="False" />
                <ComboBox Height="23" HorizontalAlignment="Right" Margin="0,70,16,0" Name="cboSprintStartField" VerticalAlignment="Top" Width="237" SelectedValue="{Binding Path=Config.ConfigStore.SprintStartField, Mode=TwoWay}" ItemsSource="{Binding Path=WorkItemFields}" IsEnabled="{Binding Path=Config.ConfigStore.CreateSprintWorkItem}" />
                <Label Content="set the start date to " Height="25" HorizontalAlignment="Left" IsEnabled="False" Margin="58,68,0,0" Name="label5" VerticalAlignment="Top" />
                <ComboBox Height="23" HorizontalAlignment="Right" IsEnabled="{Binding Path=Config.ConfigStore.CreateSprintWorkItem}" ItemsSource="{Binding Path=WorkItemFields}" Margin="0,99,16,0" Name="cboSprintFinishField" SelectedValue="{Binding Path=Config.ConfigStore.SprintFinishField, Mode=TwoWay}" VerticalAlignment="Top" Width="237" />
                <Label Content="and the finished date to " Height="25" HorizontalAlignment="Left" IsEnabled="False" Margin="58,97,0,0" Name="label6" VerticalAlignment="Top" />
            </Grid>

        </GroupBox>
        <GroupBox Header="Change Current Iteration" Height="94" HorizontalAlignment="Left" Margin="20,265,0,0" Name="grpChangeCurrentIteration" VerticalAlignment="Top" Width="499" IsEnabled="{Binding Path=Config.ConfigStore.NewIterationManualConfig}">
            <Grid Height="68" Width="484">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="64*" />
                    <ColumnDefinition Width="519*" />
                </Grid.ColumnDefinitions>
                <CheckBox Content="Change current iteration folder" Height="16" HorizontalAlignment="Left" IsChecked="{Binding Path=Config.ConfigStore.ChangeCurrentIteratonFolder, Mode=TwoWay}" IsEnabled="{Binding Path=Config.ConfigStore.NewIterationManualConfig}" Margin="27,14,0,0" Name="checkBox2" VerticalAlignment="Top" Width="220" Grid.ColumnSpan="2" />
                <Label Content="Current iteration TeamQuery folder " Height="30" HorizontalAlignment="Left" Margin="55,35,0,0" Name="label4" VerticalAlignment="Top" Grid.ColumnSpan="2" />
                <ComboBox Height="23" HorizontalAlignment="Left" IsEnabled="{Binding Path=Config.ConfigStore.ChangeCurrentIteratonFolder}" SelectedValuePath="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=TeamQueryFolders}" Margin="196,35,0,0" Name="comboBox1" SelectedValue="{Binding Path=Config.ConfigStore.CurrentIterationWIQLFolder, Mode=TwoWay}" VerticalAlignment="Top" Width="216" Grid.Column="1" />
            </Grid>
        </GroupBox>
        <Button Content="Cancel" Height="23" HorizontalAlignment="Left" Margin="436,390,0,0" Name="cmdCancel" VerticalAlignment="Top" Width="75" Click="cmdCancel_Click" />
        <Button Content="OK" Height="23" HorizontalAlignment="Left" Margin="352,390,0,0" Name="cmdOk" VerticalAlignment="Top" Width="75" Click="cmdOk_Click" />

    </Grid>
</Window>
